#coding:utf-8
import codecs

f=codecs.open("a.txt",mode='r',encoding='GBK')
print f.read()
f.close()

w=codecs.open("c.txt",mode='a',encoding='UTF-8')
print w.write(u"你好")
w.close()

c=codecs.open("c.txt",mode='r',encoding='UTF-8')
print c.read()
c.close()